package com.ceshi.mvpdemo.Presenter;

import com.ceshi.mvpdemo.View.BaseView;

public class BasePresenter<V extends BaseView> {

    private V mvpView;

    public void attachView(V view){
        mvpView=view;
    }

    public void detachView(){
        mvpView=null;
    }

    public boolean isViewAttached(){
        return mvpView != null;
    }

    /**
     * 获取连接的view
     */
    public V getView(){
        return mvpView;
    }


}
